package com.zyx.javademo.bean;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;

/**
 * @author zyx
 * @since 2021/7/18 07:32
 * desc: 测试JsonField
 */
@NonNull
public class JsonFieldDemo {
    @JSONField(name = "price")
    private String p = "";
    @JSONField(name = "quantity", defaultValue = "")
    private String q = "";

    public JsonFieldDemo() {
    }

    public JsonFieldDemo(String p, String q) {
        this.p = p;
        this.q = q;
    }

    public String getP() {
        return p;
    }

    public void setP(String p) {
        this.p = p;
    }

    public String getQ() {
        return q;
    }

    public void setQ(String q) {
        this.q = q;
    }
}
